package com.feige.pojo.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * @author feige
 */
@ApiModel(value = "登录表单实体")
public class LoginFormDto {
    /**
     * 用户名
     */
    @NotBlank(message = "用户名不能为空")
    @ApiModelProperty(value = "用户名")
    private String username;

    /**
     * 用户密码
     */
    @Size(min = 6,max = 18,message = "密码长度必须在6~18位")
    @ApiModelProperty(value = "用户密码")
    private String password;

    /**
     * 验证码
     */
    @NotBlank(message = "验证码")
    @ApiModelProperty(value = "验证码")
    private String code;

    /**
     * 唯一标识
     */
    @NotBlank(message = "唯一标识")
    @ApiModelProperty(value = "唯一标识")
    private String uuid = "";

    public LoginFormDto() {
    }

    public LoginFormDto(String username, String password, String code, String uuid) {
        this.username = username;
        this.password = password;
        this.code = code;
        this.uuid = uuid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    @Override
    public String toString() {
        return "LoginFormVo{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", code='" + code + '\'' +
                ", uuid='" + uuid + '\'' +
                '}';
    }
}
